import { HashRouter, Routes, Route,Navigate } from "react-router-dom";
import { lazy, Suspense } from 'react'
const Index = lazy(() => import('../pages/index'));
const Login = lazy(() => import('../login/login'));
const Category = lazy(() => import('../pages/category'));
const Install = lazy(()=>import('../pages/install'))
const Shopcar = lazy(()=>import('../pages/shopcar'))
// const Hook = lazy(()=>import('../pages/hook'))
const BasicRoute = () => (
    <HashRouter>
        <Suspense fallback={''}>
            <Routes>
                <Route path="/" element={<Navigate to='/install'></Navigate>}></Route>


            {/*     <Route path="/" element={<Navigate to='/install'></Navigate>}></Route> */}
                <Route path='/' element={<Index />}>

                     <Route path='/category/:id' element={<Category />}></Route>

                     {/* <Route path='/hook' element={<Hook />}></Route> */}
                     <Route path='/install' element={<Install />}></Route>
                </Route>

                <Route path='login' element={<Login />}></Route>
                <Route path='shopcar' element={<Shopcar />}></Route>

            </Routes>
        </Suspense>
    </HashRouter>
);
export default BasicRoute;   
